<template>
    <div>
        <van-sticky :offset-top="0">
            <van-nav-bar title="餐厅信息" left-text="返回" left-arrow @click-left="onClickLeft" />
        </van-sticky>
        <img :src="photo" alt="">
        <p>{{ infomation }}</p>
        <p>
            <van-icon name="location-o" />{{ address }}
        </p>

        <p>
            <van-icon name="phone-o" />订餐电话:{{ phone }}
        </p>

        <van-icon name=" location-o" /><span></span>
    </div>
</template>

<script setup lang="ts">
import { infomationGet } from '../../api/home'




let res = await infomationGet()

// console.log(res.data.results[0]);
// 设置常量
let address = res.data.results[0].address;
let infomation = res.data.results[0].content;
let photo = res.data.results[0].img
let phone = res.data.results[0].phone
// console.log(res);
const onClickLeft = () => history.back();


</script>





<style lang="scss" scoped>
img {
    margin-top: 4rem;
    margin-left: 2rem;
    width: 70rem;
    height: 30rem;
}

p {
    font-size: 3rem;
    line-height: 40px;
    text-indent: 2.5rem;
    width: 70rem;
    margin: 0 auto;
}
</style>